import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
  const createRouter = () => new Router({
    mode: 'hash',
    scrollBehavior: () => ({ y: 0 }),
    isAddDynamicMenuRoutes: false, // 是否已经添加动态(菜单)路由
    routes: [],
  })

  const router = createRouter()
  
  export function resetRouter () {
    const newRouter = createRouter()
    router.matcher = newRouter.matcher // the relevant part
    console.log(router)
  }
  
  export default router